
import {request} from './request'

export function getDetail(iid){
    return request({
        url:'/detail/',
        params:{
            iid
        }
    })
}

export class Goods{
    constructor(itemInfo,columns,services){
        this.title = itemInfo.title
        this.desc = itemInfo.desc                   //描述
        this.newPrice = itemInfo.price            //折后价
        this.oldPrice = itemInfo.oldPrice        //原价
        this.discount = itemInfo.discountDesc   //折扣
        this.columns = columns                   //销量
        this.services = services                 //服务
        this.realPrice = itemInfo.lowNowPrice    //最低价
    }
}

export  class Shop{
    constructor(shopInfo){
        this.logo = shopInfo.shopLogo             //店铺logo
        this.score = shopInfo.score               //店铺评分
        this.name = shopInfo.name               //店铺名字
        this.goodsCount = shopInfo.cGoods            //商品数
        this.sell = shopInfo.cSells              //销售额
        this.fans = shopInfo.cFans             //粉丝
    }
}
